
export enum RankOper {
    Player = -1,
    Attack = 31,
    Defense = 32,
    Village = 92,
    Union = 94,
    Area = 95,
    Activity = 96,
    Hero = 99,
}

export interface RankUser{
    Ally: {allyCutName:string, allyId:number}
    Memo2:string
    People:number
    RaceName:string
    Rank:number
    UserId:number
    UserName:string
    UserTypeName:string
    VillageNum:number
    VillageList: {People:number, VillageName:string, X:number, Y:number, ZoneId:number, isMainVillage:number}[]
}

export class Rank {
    Index:number
    PlayerId: number
    PlayerName: string
    AllyId: number
    AllyName: string

    OpenId: string
    PlayerAttackPoint: number
    PlayerAttackRank: number
    PlayerDefensePoint: number
    PlayerDefenseRank: number
    PlayerPeople: number
    PlayerPeopleRank: number
    VillageNum: number


    VillageName: string
    VillagePeople: number
    VillageRank: number
    ZoneId: number


    AllyPoint: number
    AllyRank: number
    AvgPeople: number
    FieldNum: number
    PlayerNum: number

    AllyPeople: number
    CT: number
    MyAllyPeople: number
    People: number
    fid: number
    rank: number

    HeroId:number
    HeroLevel:number
    HeroName:string
    HeroRank:number


    /**
     * 根据接口返回的数据创建
     * @param data 
     * @returns 
     */
    static createByData(data:any):Rank{
        let r = new Rank()
        for(let key in data){
            r[key] = data[key]
        }

        return r
    }

}